home *** CD-ROM | disk | FTP | other *** search
/ Chip 2006 June (Extra) / CHIP 2006-06.3.iso / program / opensource / clamav-devel.exe / contrib / init / NetBSD2.0 / clamav
Encoding:
Text File  |  2006-05-16  |  1.4 KB  |  49 lines

  1. #!/bin/sh
  2.  
  3. # Copyright (C) 2004 Nigel Horne <njh@bandsman.co.uk>
  4. #
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  18. # MA 02110-1301, USA.
  19. #
  20. # Install into /etc/rc.d as /etc/rc.d/clamav
  21. #    chmod 755 /etc/rc.d/clamav
  22. #
  23. # Add lines such as this to /etc/rc.conf:
  24. #    clamd="YES"
  25. #    clamav_milter="YES"
  26. #    clamav_milter_flags="--max-children=2 --dont-wait --timeout=0 -P local:/var/run/clamav/clamav.sock --pidfile=/var/run/clamav/clamav-milter.pid --quarantine-dir=/var/run/clamav/quarantine"
  27. #
  28. # Tested with NetBSD 2.0
  29.  
  30. # PROVIDE: clamav
  31. # REQUIRE: NETWORKING
  32. # KEYWORD: NetBSD
  33.  
  34. . /etc/rc.subr
  35.  
  36. name="clamd"
  37. command="/usr/local/sbin/${name}"
  38.  
  39. load_rc_config $name
  40. run_rc_command "$1"
  41.  
  42. name="clamav_milter"
  43. command="/usr/local/sbin/clamav-milter"
  44.  
  45. load_rc_config $name
  46. if [ $clamav_milter = YES ]; then
  47.     run_rc_command "$1"
  48. fi
  49.